home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / tsbgex / src / neko / bios.asm next >
Encoding:
Assembly Source File  |  1994-11-16  |  910 b   |  65 lines

  1.     assume    cs:bios
  2. bios    segment para public 'CODE'
  3.     
  4.     public    _setfs
  5. _setfs    proc    near
  6.     mov    ax,4[esp]
  7.     mov    fs,ax
  8.     ret
  9. _setfs    endp
  10.  
  11.     public    _getpallet
  12. _getpallet proc    near
  13.     push    edx
  14.     mov    edx,8[esp]
  15.     mov    ax,0110H
  16.     push    fs
  17.     mov    fs,ax
  18.     mov    ax,0501H
  19.     call    pword ptr fs:[01c0H]
  20.     pop    fs
  21.     pop    edx
  22.     ret
  23. _getpallet endp
  24.  
  25.     public    _mousepos
  26. _mousepos proc    near
  27.     push    ebx
  28.     push    ecx
  29.     push    edx
  30.     push    fs
  31.     mov    ax,0110H    ; tbios selector
  32.     mov    fs,ax
  33.     mov    ah,3        ; get mouse button & pos
  34.     call    pword ptr fs:[40H]    ; mouse BIOS
  35.     pop    fs
  36.     mov    eax,16[esp]
  37.     mov    [eax],dx        ; x
  38.     mov    eax,20[esp]
  39.     mov    [eax],bx        ; y
  40.     pop    edx
  41.     pop    ecx
  42.     pop    ebx
  43.     ret
  44. _mousepos endp
  45.  
  46.     public    _putfs
  47. _putfs    proc    near
  48.     push    ebx
  49.     mov    eax,8[esp]
  50.     mov    ebx,12[esp]
  51.     mov    fs:[eax],ebx
  52.     pop    ebx
  53.     ret
  54. _putfs    endp
  55.  
  56.     public    _getfs
  57. _getfs    proc    near
  58.     mov    eax,4[esp]
  59.     mov    eax,fs:[eax]
  60.     ret
  61. _getfs    endp
  62.  
  63. bios    ends
  64.     end
  65.